package Thread;

public class MyBlockingQueue {
    public static String[] elems = null;
    public static int head =0;
    public static int tail =0;
    public static int size =0;

    public MyBlockingQueue(int capacity) {
        elems = new String[capacity];
    }
    void put(String elem) {
        if(size >= elems.length) {
            //满了
        }
        elems[tail] = elem;
        tail++;
        if(tail >= elems.length) {
            tail = 0;
        }
        size++;
    }

}
